﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace XREditor.Models
{
    /// <summary>
    /// 类型表
    /// </summary>
    [SugarTable("category", TableDescription = "类型表")]
    public class Category
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id", ColumnDescription = "主键ID")]
        public long Id { get; set; }

        /// <summary>
        /// 类型名称
        /// </summary>
        [SugarColumn(ColumnName = "name", ColumnDescription = "类型名称")]
        public string Name { get; set; }

        /// <summary>
        /// 是否激活数据 1-是 0-否
        /// </summary>
        [SugarColumn(ColumnName = "isactive", ColumnDescription = "是否激活数据 1-是 0-否")]
        public int IsActive { get; set; } = 1;

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "created", IsOnlyIgnoreUpdate = true)]
        public DateTime Created { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新时间
        /// </summary>        
        [SugarColumn(ColumnName = "updated")]
        public DateTime Updated { get; set; } = DateTime.Now;

    }
}
